/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2022-04-18
 * Time: 20:56
 */

//Scanner scan = new Scanner(System.in);

import java.util.Scanner;

public class FibonacciNum {

    /**
     * 迭代（循环）求斐波那契数列的第n个数（推荐）
     * @param n
     * @return
     */
    public static int fibonacci(int n) {
        int f1 = 1;
        int f2 = 1;
        int f3 = 1;
        for (int i = 3; i <= n; i++) {
            f3 = f1 + f2;
            f1 = f2;
            f2 = f3;
        }
        return f3;
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int answer = fibonacci(n);
        System.out.println(answer);
    }
}
